package com.starblink.android.basic.btmnavanim;

import android.view.View;

import com.starblink.basic.util.log.YYLogUtils;

public class NavAnimObs implements NavObserver {

    private String tag;
    private int dy;
    private NavSubject sub;

    private boolean isShow = true;


    public NavAnimObs(NavSubject setData) {
        this.sub = setData;
        sub.registerObserver(this);
    }


    //dy大于0 上拉
    //小于0 下拉
    @Override
    public void update(String pageTag, int dy) {
        this.tag = pageTag;
        this.dy = dy;
        refreshNavAnim();
    }

    public void refreshNavAnim() {
        BtmNavAnimControl.INSTANCE.setControlData(tag,dy);
    }

}
